.. _`Imputer`: .. _`org.sysess.sympathy.machinelearning.imputer`: Imputer ``````` .. image:: imputer.svg :width: 48 Replaces missing values in a data set with a computed value infered from the remained of the data set. If there are missing data in the data set, those needs to be removed or replaced first. Documentation ::::::::::::: Attributes ========== **statistics_** The imputation fill value for each feature. Computing statistics can result in `np.nan` values. During :meth:`transform`, features corresponding to `np.nan` statistics will be discarded. Definition :::::::::: Output ports ============ **model** model Model Configuration ============= **Placeholder for missing values** (missing_values) The placeholder for the missing values. All occurrences of `missing_values` will be imputed. For pandas' dataframes with nullable integer dtypes with missing values, `missing_values` should be set to `np.nan`, since `pd.NA` will be converted to `np.nan`. **Imputing strategy** (strategy) The imputation strategy. - If "mean", then replace missing values using the mean along each column. Can only be used with numeric data. - If "median", then replace missing values using the median along each column. Can only be used with numeric data. - If "most_frequent", then replace missing using the most frequent value along each column. Can be used with strings or numeric data. If there is more than one such value, only the smallest is returned. - If "constant", then replace missing values with fill_value. Can be used with strings or numeric data. .. versionadded:: 0.20 strategy="constant" for fixed value imputation. Implementation ============== .. automodule:: node_preprocessing :noindex: .. class:: Imputer :noindex: